package com.ruoyi.work.service.impl;

import com.ruoyi.flowable.api.domain.WorkSignFile;
import com.ruoyi.work.mapper.WorkSignFileMapper;
import com.ruoyi.work.service.IWorkSignFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 签署文件Service业务层处理
 *
 * @author fengcheng
 * @date 2025-03-20
 */
@Service
public class WorkSignFileServiceImpl implements IWorkSignFileService {
    @Autowired
    private WorkSignFileMapper workSignFileMapper;

    /**
     * 查询签署文件
     *
     * @param signFileId 签署文件主键
     * @return 签署文件
     */
    @Override
    public WorkSignFile selectWorkSignFileBySignFileId(Long signFileId) {
        return workSignFileMapper.selectWorkSignFileBySignFileId(signFileId);
    }

    /**
     * 查询签署文件列表
     *
     * @param workSignFile 签署文件
     * @return 签署文件
     */
    @Override
    public List<WorkSignFile> selectWorkSignFileList(WorkSignFile workSignFile) {
        return workSignFileMapper.selectWorkSignFileList(workSignFile);
    }

    /**
     * 新增签署文件
     *
     * @param workSignFile 签署文件
     * @return 结果
     */
    @Override
    public int insertWorkSignFile(WorkSignFile workSignFile) {
        return workSignFileMapper.insertWorkSignFile(workSignFile);
    }

    /**
     * 修改签署文件
     *
     * @param workSignFile 签署文件
     * @return 结果
     */
    @Override
    public int updateWorkSignFile(WorkSignFile workSignFile) {
        return workSignFileMapper.updateWorkSignFile(workSignFile);
    }

    /**
     * 批量删除签署文件
     *
     * @param signFileIds 需要删除的签署文件主键
     * @return 结果
     */
    @Override
    public int deleteWorkSignFileBySignFileIds(Long[] signFileIds) {
        return workSignFileMapper.deleteWorkSignFileBySignFileIds(signFileIds);
    }

    /**
     * 删除签署文件信息
     *
     * @param signFileId 签署文件主键
     * @return 结果
     */
    @Override
    public int deleteWorkSignFileBySignFileId(Long signFileId) {
        return workSignFileMapper.deleteWorkSignFileBySignFileId(signFileId);
    }

    /**
     * 根据签署id删除签署文件
     *
     * @param signId
     */
    @Override
    public void deleteWorkSignFileBySignId(Long signId) {
        workSignFileMapper.deleteWorkSignFileBySignId(signId);
    }

    /**
     * 批量新增签署文件
     *
     * @param signFileList
     */
    @Override
    public void insertWorkSignFileList(List<WorkSignFile> signFileList) {
        workSignFileMapper.insertWorkSignFileList(signFileList);
    }

    /**
     * 根据签署id查询签署文件
     *
     * @param signId 签署id
     * @return
     */
    @Override
    public WorkSignFile getInfoWorkSignFile(Long signId) {
        return workSignFileMapper.getInfoWorkSignFile(signId);
    }
}
